<script >
  import TopNav from "@/components/page/TopNav.vue";
  import {ElMessage} from "element-plus";
  import Axios from "@/api/request/request";
  import Body from "@/components/page/ponents/Body.vue";
  import IndexLeft from "@/components/page/ponents/IndexLeft.vue";
  import index from "@/components/page/Index.vue";
  export default {
    name:'Index',
    computed: {
      index() {
        return index
      }
    },
    components: {IndexLeft, Body, TopNav},
    data(){
      return{
        tableData:[],//数据展示
      }
    },
    methods:{
      ElMessage,
      watchFramUrl(){

      }
    },
    mounted() {
       Axios.get('/role/page?current=34&limit=56').then(({data})=>{
        this.tableData=data
      })
      Axios.get('/secure/admin/api').then(({data})=>{
        console.log(data)
      })
      Axios.get('/secure/user/api').then(({data})=>{
        console.log(data)
      })
    }
  }
</script>

<template>

  <el-form>
  <div class="common-layout">
    <el-container>
      <el-aside style="width: 15%">
        <index-left/><!--需要从这个组件里面获取菜单信息实现右侧body内容的切换-->
      </el-aside>
        <el-container>
        <el-header >
          <TopNav/>
        </el-header>
        <!-- 改变body的页面实现切换数据页面 -->
       <el-main>
         <Body></Body>
       </el-main>
      </el-container>
    </el-container>
  </div>
  </el-form>

</template>

<style scoped>
.toggle-button{
  background-color: #4A5064;
  //font-size: 10px;
  //line-height: 24px;
  color: #fff;
  text-align: center;
  letter-spacing: 0.2em;
  cursor: pointer;
}
</style>
